public class NCount {
    public static void main(String[] args) {
        int sum=0;
        for (int i = 1; i <=10 ; i++) {
            int index=1;
            for (int j = 1; j <=i; j++) {
                index*=j;
            }
            sum+=index;
        }
        System.out.println("1~10的阶乘为:"+sum);
    }
}
